package com.itheima.网络编程.tcp编程.tcp编程.tcp网络编程;

import java.io.*;
import java.net.Socket;

public class 文件客户端 {
    public static void main(String[] args) throws IOException {
        Socket sk = new Socket("127.0.0.1", 10022);
        BufferedReader br = new BufferedReader(new FileReader("day16 网络编程\\subways.txt"));
        OutputStream out = sk.getOutputStream();
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out));
        String line;
        while ((line = br.readLine()) != null) {
            bw.write(line);
            bw.newLine();
        }
        bw.close();
        br.close();
        sk.close();
    }
}
